fix(ui): make messages layout responsive#960
Conversation
jmattheis
left a comment
There was a problem hiding this comment.
Thanks for the contribution.
Allow the Messages page to use more horizontal space while sizing individual message cards based on their content. Short text messages keep the compact width, while messages with wide content such as code or log blocks can expand up to the available page width. Keep preformatted content unwrapped with internal horizontal scrolling, matching the existing code block behavior.
732b8e1 to
28b5a8a
Compare
|
Thanks for the review. I updated the PR to keep I also changed the message card sizing so short text-only messages keep the compact width, while wider content such as logs or code blocks can expand up to the available page width. I retested it on desktop, laptop, and mobile web viewports. Unrelated to this PR: would you be open to a separate PR adding an optional WebUI settings/preferences section? The idea would be to keep all current defaults unchanged, but allow users to customize some UI preferences explicitly from the WebUI. For example, message layout/display preferences could live there instead of changing the default behavior for everyone. I’m asking before working on it, since I’d rather avoid spending time on a larger UI change if this is not something you would want in Gotify. |
✨ Summary
This improves the responsiveness of the WebUI Messages page.
The Messages page was previously constrained by the default
DefaultPagewidth, which made the message list feel unnecessarily narrow on desktop screens and left a lot of available horizontal space unused.This PR keeps the change scoped to the Messages page and preserves the existing layout for the other pages.
Fixes #744
🖥️ Desktop behavior
On larger desktop screens, the Messages page now uses more of the available horizontal space while still keeping a reasonable maximum width.
This makes long notifications, logs, Markdown content, and code blocks much easier to read without changing the overall Gotify layout.
🔧 Changes
maxWidthonly for the Messages page.<pre>blocks to the message card width while preserving internal horizontal scrolling.✅ Tested
I tested the change locally on:
Everything works as expected:
📸 Screenshots
Desktop :
Laptop :
Mobile web :